package org.nanhill.xsheet.input.excel;

import java.io.IOException;
import java.io.InputStream;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.nanhill.commons.model.table.Row;
import org.nanhill.commons.model.table.Table;
import org.nanhill.xsheet.XSheetParseException;
import org.nanhill.xsheet.input.AbstractInputBuilder;

/**
 * input builder for : poi hssf sheet --> xsheet model
 * 
 * @author alin
 * 
 */
public abstract class ExcelInputBuilder extends AbstractInputBuilder {

	protected HSSFWorkbook workbook;

	public void setWorkbook(HSSFWorkbook workbook) {
		this.workbook = workbook;
	}

	public void read(InputStream is) throws IOException, XSheetParseException {
		
	}

	protected abstract void buildTable(HSSFSheet sheet)
			throws XSheetParseException;

	protected abstract void buildRow(HSSFRow row, Table table)
			throws XSheetParseException;

	protected abstract void buildCell(HSSFCell cell, Row row)
			throws XSheetParseException;

	
}
